﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Tst.Models;
using System.Web.Security;
using System.Web.Profile;
using Ext.Direct.Mvc;
    
namespace Tst.Controllers
{
    public class HomeController : Controller
    {
        [DirectIgnore]
        public ActionResult Login()
        {
            return View();
        }

        [DirectIgnore]
        [HttpPost]
        public ActionResult Login(string login, string password)
        {
            //if (Membership.ValidateUser(login, password))
            //{
                FormsAuthentication.SetAuthCookie(login, false);
                return Json(new { success = true });
            //}

            //return Json(new { success = false });
        }

        [DirectIgnore]
        public ActionResult Index()
        {
            return View();
        }
    }
}
